
class Student{
    String name;
    int age;
    public Student(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void putStudent(){
        System.out.println("姓名：" + this.name);
        System.out.println("年龄："+ this.age);
    }
}
public class test {
    public static void main(String[] args) {
        Student stu = new Student("zhangsan",18);
        stu.putStudent();
    }

}
